package com.dbtimer.dbupdatespring.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 观测数据经过处理后，且通过公式计算后得到效应量以后的数据序列
 * @author swx
 * @TableName data_points
 */
@TableName(value ="data_points")
@Data
public class DataPointsEntity implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 测点编号
     */
    @TableField(value = "point_index")
    private String pointIndex;

    /**
     * 观测时间
     */
    @TableField(value = "view_time")
    private Date viewTime;

    /**
     * 1号观测量
     */
    @TableField(value = "ob1")
    private Double ob1;

    /**
     * 2号观测量
     */
    @TableField(value = "ob2")
    private Double ob2;

    /**
     * 3号观测量
     */
    @TableField(value = "ob3")
    private Double ob3;

    /**
     * 4号观测量
     */
    @TableField(value = "ob4")
    private Double ob4;

    /**
     * 5号观测量
     */
    @TableField(value = "ob5")
    private Double ob5;

    /**
     * 6号观测量
     */
    @TableField(value = "ob6")
    private Double ob6;

    /**
     * 5号观测量
     */
    @TableField(value = "ob7")
    private Double ob7;

    /**
     * 6号观测量
     */
    @TableField(value = "ob8")
    private Double ob8;

    /**
     * 计算温度
     */
    @TableField(value = "value1")
    private Double value1;

    /**
     * 监测物理量1号
     */
    @TableField(value = "value2")
    private Double value2;

    /**
     * 
     */
    @TableField(value = "value3")
    private Double value3;

    /**
     * 监测物理量2号
     */
    @TableField(value = "value4")
    private Double value4;

    /**
     * 监测物理量3号
     */
    @TableField(value = "value5")
    private Double value5;

    /**
     * 监测物理量4号
     */
    @TableField(value = "value6")
    private Double value6;

    /**
     * 监测物理量5号
     */
    @TableField(value = "value7")
    private Double value7;

    /**
     * 监测物理量4号
     */
    @TableField(value = "value8")
    private Double value8;

    /**
     * 监测物理量5号
     */
    @TableField(value = "value9")
    private Double value9;

    /**
     * 数据采集方式
     */
    @TableField(value = "way")
    private String way;

    /**
     * 备注信息
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 标注该数据是否已经校验，0：未校验，1：未计算成功，2：未评估，3：已校验
     */
    @TableField(value = "ischeck")
    private Integer ischeck;

    /**
     * 当前测点数据是否异常，0：正常；1：异常，2：测值粗差
     */
    @TableField(value = "status")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataPointsEntity other = (DataPointsEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPointIndex() == null ? other.getPointIndex() == null : this.getPointIndex().equals(other.getPointIndex()))
            && (this.getViewTime() == null ? other.getViewTime() == null : this.getViewTime().equals(other.getViewTime()))
            && (this.getOb1() == null ? other.getOb1() == null : this.getOb1().equals(other.getOb1()))
            && (this.getOb2() == null ? other.getOb2() == null : this.getOb2().equals(other.getOb2()))
            && (this.getOb3() == null ? other.getOb3() == null : this.getOb3().equals(other.getOb3()))
            && (this.getOb4() == null ? other.getOb4() == null : this.getOb4().equals(other.getOb4()))
            && (this.getOb5() == null ? other.getOb5() == null : this.getOb5().equals(other.getOb5()))
            && (this.getOb6() == null ? other.getOb6() == null : this.getOb6().equals(other.getOb6()))
            && (this.getOb7() == null ? other.getOb7() == null : this.getOb7().equals(other.getOb7()))
            && (this.getOb8() == null ? other.getOb8() == null : this.getOb8().equals(other.getOb8()))
            && (this.getValue1() == null ? other.getValue1() == null : this.getValue1().equals(other.getValue1()))
            && (this.getValue2() == null ? other.getValue2() == null : this.getValue2().equals(other.getValue2()))
            && (this.getValue3() == null ? other.getValue3() == null : this.getValue3().equals(other.getValue3()))
            && (this.getValue4() == null ? other.getValue4() == null : this.getValue4().equals(other.getValue4()))
            && (this.getValue5() == null ? other.getValue5() == null : this.getValue5().equals(other.getValue5()))
            && (this.getValue6() == null ? other.getValue6() == null : this.getValue6().equals(other.getValue6()))
            && (this.getValue7() == null ? other.getValue7() == null : this.getValue7().equals(other.getValue7()))
            && (this.getValue8() == null ? other.getValue8() == null : this.getValue8().equals(other.getValue8()))
            && (this.getValue9() == null ? other.getValue9() == null : this.getValue9().equals(other.getValue9()))
            && (this.getWay() == null ? other.getWay() == null : this.getWay().equals(other.getWay()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getIscheck() == null ? other.getIscheck() == null : this.getIscheck().equals(other.getIscheck()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPointIndex() == null) ? 0 : getPointIndex().hashCode());
        result = prime * result + ((getViewTime() == null) ? 0 : getViewTime().hashCode());
        result = prime * result + ((getOb1() == null) ? 0 : getOb1().hashCode());
        result = prime * result + ((getOb2() == null) ? 0 : getOb2().hashCode());
        result = prime * result + ((getOb3() == null) ? 0 : getOb3().hashCode());
        result = prime * result + ((getOb4() == null) ? 0 : getOb4().hashCode());
        result = prime * result + ((getOb5() == null) ? 0 : getOb5().hashCode());
        result = prime * result + ((getOb6() == null) ? 0 : getOb6().hashCode());
        result = prime * result + ((getOb7() == null) ? 0 : getOb7().hashCode());
        result = prime * result + ((getOb8() == null) ? 0 : getOb8().hashCode());
        result = prime * result + ((getValue1() == null) ? 0 : getValue1().hashCode());
        result = prime * result + ((getValue2() == null) ? 0 : getValue2().hashCode());
        result = prime * result + ((getValue3() == null) ? 0 : getValue3().hashCode());
        result = prime * result + ((getValue4() == null) ? 0 : getValue4().hashCode());
        result = prime * result + ((getValue5() == null) ? 0 : getValue5().hashCode());
        result = prime * result + ((getValue6() == null) ? 0 : getValue6().hashCode());
        result = prime * result + ((getValue7() == null) ? 0 : getValue7().hashCode());
        result = prime * result + ((getValue8() == null) ? 0 : getValue8().hashCode());
        result = prime * result + ((getValue9() == null) ? 0 : getValue9().hashCode());
        result = prime * result + ((getWay() == null) ? 0 : getWay().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getIscheck() == null) ? 0 : getIscheck().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName() +
                " [" +
                "Hash = " + hashCode() +
                ", id=" + id +
                ", pointIndex=" + pointIndex +
                ", view_time=" + viewTime +
                ", ob1=" + ob1 +
                ", ob2=" + ob2 +
                ", ob3=" + ob3 +
                ", ob4=" + ob4 +
                ", ob5=" + ob5 +
                ", ob6=" + ob6 +
                ", ob7=" + ob7 +
                ", ob8=" + ob8 +
                ", value1=" + value1 +
                ", value2=" + value2 +
                ", value3=" + value3 +
                ", value4=" + value4 +
                ", value5=" + value5 +
                ", value6=" + value6 +
                ", value7=" + value7 +
                ", value8=" + value8 +
                ", value9=" + value9 +
                ", way=" + way +
                ", remarks=" + remarks +
                ", ischeck=" + ischeck +
                ", status=" + status +
                ", serialVersionUID=" + serialVersionUID +
                "]";
    }
}